load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "admitter.go",
        "mutator.go",
        "stub.go",
    ],
    importpath = "kubevirt.io/kubevirt/pkg/instancetype/webhooks/vm",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/instancetype/apply:go_default_library",
        "//pkg/instancetype/conflict:go_default_library",
        "//pkg/instancetype/find:go_default_library",
        "//pkg/instancetype/infer:go_default_library",
        "//pkg/instancetype/preference/apply:go_default_library",
        "//pkg/instancetype/preference/find:go_default_library",
        "//pkg/instancetype/preference/requirements:go_default_library",
        "//pkg/instancetype/preference/validation:go_default_library",
        "//pkg/util/webhooks:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/api/instancetype/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
        "//staging/src/kubevirt.io/client-go/log:go_default_library",
        "//vendor/k8s.io/api/admission/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "admitter_test.go",
        "vm_suite_test.go",
    ],
    race = "on",
    deps = [
        ":go_default_library",
        "//pkg/instancetype/conflict:go_default_library",
        "//pkg/libvmi:go_default_library",
        "//pkg/pointer:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/api/instancetype/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubevirt/fake:go_default_library",
        "//vendor/github.com/onsi/ginkgo/v2:go_default_library",
        "//vendor/github.com/onsi/gomega:go_default_library",
        "//vendor/go.uber.org/mock/gomock:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
    ],
)
